{extend name="default/base" /}
{block name="title"}{$goods['goodsName']} - {:WSTConf('CONF.mallName')}{__block__}{/block}
{block name="meta"}
<meta name="description" content="{$goods['goodsName']}">
<meta name="Keywords" content="{$goods['goodsSeoKeywords']}">
{/block}
{block name="css"}
<link href="__STYLE__/css/goods.css?v={$v}" rel="stylesheet">
{/block}
{block name="nav"}
  {include file="default/header" /}
{/block}
{block name="main"}
<div class='wst-w' style='margin-bottom:0px'>
<div class='wst-filters'>
   <div class='item' style="border:1px solid transparent;border-left:2px solid #df2003;padding-left: 8px">
      <a class='link' href="{:url('home/index/index')}">首页</a>
      <i class="arrow"></i>
   </div>
   {volist name=":WSTPathGoodsCat($goods['goodsCatId'])" id='vo'}
   <div class='wst-lfloat'>
    <div class='item dorpdown'>
     <div class='drop-down'>
        <a class='link' href='{:Url("home/goods/lists",["cat"=>$vo["catId"]])}'>{$vo['catName']}</a>
     </div>
     <div class="dorp-down-layer">
         {volist name=":WSTGoodsCats($vo['parentId'])" id='vo2'}
         <div class="{$vo['parentId']>0?'cat2':'cat1'}"><a href='{:Url("home/goods/lists","cat=".$vo2["catId"])}'>{$vo2['catName']}</a></div>
         {/volist}
     </div>
  </div>
  <i class="arrow"></i>
   </div>
   {/volist}
   <div class='wst-clear'></div>
</div>
</div>
<div class='wst-w'>
   <div class='wst-container' style='width: 1198px;border:1px solid #e6e6e6;'>
      <div class='goods-img-box'>
          <div class="goods-img spec-preview" id="preview">
            <img title="{$goods['goodsName']}" alt="{$goods['goodsName']}" src="__RESOURCE_PATH__/{:WSTImg($goods['goodsImg'])}" class="cloudzoom" data-cloudzoom="zoomImage:'__RESOURCE_PATH__/{$goods['goodsImg']}'" height="350" width="350">
          </div>
          <div class="goods-pics">
            <a class="prev">&lt;</a>
            <a class="next">&gt;</a>
            <div class="items">
               <ul>
               {volist name="$goods['gallery']" id='vo'}
                   <li><img title="{$goods['goodsName']}" alt="{$goods['goodsName']}" class='cloudzoom-gallery' src="__RESOURCE_PATH__/{:WSTImg($vo)}" data-cloudzoom="useZoom: '.cloudzoom', image:'__RESOURCE_PATH__/{:WSTImg($vo)}', zoomImage:'__RESOURCE_PATH__/{$vo}' " width="60" height="60"></li>
               {/volist}
         </ul>  
      </div>
      <div class="wst-clear"></div>
         </div>
         <div class="goods-term-box">
            <div class="wst-favorite">
               {if ($goods['favGood']>0)}
                 <a href='javascript:void(0);' onclick='WST.cancelFavorite(this,0,{$goods["goodsId"]},{$goods['favGood']})' class='favorite j-fav'>已关注</a>
               {else}
                 <a href='javascript:void(0);' onclick='WST.addFavorite(this,0,{$goods["goodsId"]},{$goods["goodsId"]})' class='favorite j-fav2 j-fav3'>关注商品</a>
               {/if}
               </div>
           <div class="wst-contrast" onclick="javascript:contrastGoods(1,{$goods['goodsId']},1)"><i></i>对比</div>
           <a  href='javascript:informs({$goods["goodsId"]})' class="j-inform">举报</a>
           <div class="wst-clear"></div>
         </div>
      </div>
      <div class='intro'>
          <div class='intro-name'>
          <h2>{$goods['goodsName']}</h2> 
          <span class='tips'>{$goods['goodsTips']}</span>  
          </div>    
          <div class='summary'>
            <div class="infol">
             <div class='item'>
               <div class='dt'>市 场 价&nbsp;</div>
               <div class='dd market-price' id='j-market-price'>￥{$goods['marketPrice']}</div>
             </div>
             <div class='item'>
               <div class='dt'>价&nbsp;&nbsp;格&nbsp;</div>
               <div class='dd price'>￥<span id='j-shop-price'>{$goods['shopPrice']}</span></div>
             </div>
             <div class='goods-intro-bg'>
               <div class='item'>
                 <ul class="ginfo_b">
                   <li>
                     <div class='dt'>销&nbsp;&nbsp;量&nbsp;</div>
                     <span class='appraise-num'>{$goods['saleNum']}</span>
                   </li>
                   <li>
                     <div class='dt'>累计评价&nbsp;</div>
                     <span class='appraise-num'>{$goods['appraiseNum']}</span>
                   </li>
                   <li>
                     <div class='dt'>商品评分&nbsp;</div>
                     <div class='dd'>
                        {for start="0" end="$goods['scores']['totalScores']"}
                          <img src="__STATIC__/plugins/raty/img/star-on.png">
                        {/for}
                        {for start="1" end="6-$goods['scores']['totalScores']"}
                          <img src="__STATIC__/plugins/raty/img/star-off.png">
                        {/for}
                     </div>
                   </li>
                   <div class="wst-clear"></div>
                 </ul>
               </div>
             </div>
             </div>             
             <div class='wst-clear'></div>
          </div>
          
          <div class="sale_box">
            {/* 促销满就送 */}
             <div class='item' id='j-promotion' style='display:none'>
               <div class='dt'>促&nbsp;&nbsp;销&nbsp;</div>
               <div class='dd'>
                 {:hook('homeDocumentGoodsPromotionDetail',['goods'=>$goods])}
               </div>
             </div>
             {:hook('homeDocumentGoodsPropDetail',['goods'=>$goods,'getParams'=>input()])}
          </div>

          <div class='spec'>
             {if !empty($goods['spec'])}
             {volist name="$goods['spec']" id='vo'}
             <div class='item'>
               <div class='dt'>{$vo['name']}&nbsp;</div>
               <div class='dd'>
               {volist name="$vo['list']" id='vo2'}
                  {if $vo2['itemImg']!=''}
                  <div class='j-option img' data-val="{$vo2['itemId']}" style='max-width:120px;min-width:80px;height:28px;padding:0px;position: relative;'><img class="cloudzoom-gallery" width="28" height="28" src="__RESOURCE_PATH__/{:WSTImg($vo2['itemImg'])}" data-cloudzoom="useZoom: '.cloudzoom', image:'__RESOURCE_PATH__/{:WSTImg($vo2['itemImg'])}', zoomImage:'__RESOURCE_PATH__/{$vo2['itemImg']}' "  title="{$vo2['itemName']}" alt="{$vo2['itemName']}"/><span>{$vo2['itemName']}</span><i></i></div>
                  {else}
                  <div class='j-option' data-val="{$vo2['itemId']}">{$vo2['itemName']}<i></i></div>
                  {/if}
               {/volist}
               </div>
               <div class='wst-clear'></div>
             </div>
             {/volist}
             {/if}
          </div>
          <div class='buy'>
             <div class='item'>
                <div class='dt'>数&nbsp;&nbsp;量&nbsp;</div>
                <div class='dd'>
                  <a href='#none' class='buy-btn' id='buy-reduce' style='color:#ccc;' onclick='javascript:WST.changeIptNum(-1,"#buyNum","#buy-reduce,#buy-add")'>-</a>
                  <input type='text' id='buyNum' class='buy-num' value='1' data-min='1' autocomplete="off" onkeyup='WST.changeIptNum(0,"#buyNum","#buy-reduce,#buy-add")' onkeypress="return WST.isNumberKey(event);" maxlength="6"/>
                  <a href='#none' class='buy-btn' id='buy-add' onclick='javascript:WST.changeIptNum(1,"#buyNum","#buy-reduce,#buy-add")'>+</a>
                    &nbsp; &nbsp;（库存：<span id='goods-stock'>0</span>&nbsp;{$goods['goodsUnit']}）
                </div>
             </div>
             <div class='item'>
                <div class='dt'>服&nbsp;&nbsp;务&nbsp;</div>
                <div class='dd'>服务由  <a class="c14_005" href='{:Url("home/shops/index","shopId=".$shop["shopId"])}' target='_blank'>{$shop['shopName']}</a> 发货并提供 售后服务。</div>
             </div>
             <div class='item' style='padding-left:95px;margin-top:20px;'>
               {if $goods['read']}
                 {if $goods['goodsType']==0}
                 <a id='addBtn' href='javascript:void(0);' class='addBtn un-buy' style='background:#eee'>加入购物车</a>
                 {/if}
                 <a id='buyBtn' href='javascript:void(0);' class='buyBtn un-buy' style='background:#eee'>立即购买</a>
               {else}
                 {if $goods['goodsType']==0}
                 <a id='addBtn' href='javascript:addCart(0,"#buyNum")' class='addBtn' >加入购物车</a>
                 {/if}
                 <a id='buyBtn' href='javascript:addCart(1,"#buyNum")' class='buyBtn'>立即购买</a>
               {/if}
              <div class='wst-clear'></div>
            </div>
       
            <div class="wst-relative" style="margin-top: 20px;margin-left: 10px;">
              <?php if(!(Request()->isSsl())){?> 
              <div style="clear: both;"></div>
        			<div class="bshare-custom icon-medium-plus">
          			<a title="分享到QQ空间" class="bshare-qzone"></a>
          			<a title="分享到新浪微博" class="bshare-sinaminiblog"></a>
          			<a title="分享到QQ好友" class="bshare-qqim"></a>
          			<a title="分享到微信" class="bshare-weixin"></a>
        			</div>
        			<script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/buttonLite.js#style=-1&pophcol=2&lang=zh"></script>
        			<script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/bshareC0.js"></script>
              <?php } ?>
              {:hook('homeDocumentGoodsDetail',['goods'=>$goods,'getParams'=>input()])}
              </div>
            </div>
      </div>

      <div class='seeing'>
         <div class='head'>看了又看</div>
         <div class='body'>
          {wst:goods type="visit" cat="$goods['goodsCatId']" num="5" id="visit" num="6"}
          <a href="{:Url('home/goods/detail','goodsId='.$visit['goodsId'])}">
          <div class="see-item">
            <div class="see-img">
              <img title="{$visit['goodsName']}" class="goodsImg" alt="{$visit['goodsName']}" data-original="__RESOURCE_PATH__/{$visit['goodsImg']}">
              <span class="see-price">￥{$visit['shopPrice']}</span>
            </div>
          </div>
          </a>
          {/wst:goods}

          


         </div>
      </div>
      <div class='wst-clear'></div>
   </div>
</div>
<div class='wst-w'>
   <div class='wst-container'>
       <div class='wst-side'>
           <div class='shop-intro'>
                <div class="shop_imgbox">
                  <img class="shopsImg" data-original="__RESOURCE_PATH__/{$shop['shopImg']}" title="{$shop['shopName']}" style="vertical-align: middle;width:120px;height:120px;">
                </div>
                <div class='title shop-name'>{$shop['shopName']}</div>
                <div class='title'>店主：{$shop['shopKeeper']}</div>
                <div class='title'>联系：
                  {:hook('homeDocumentContact',['type'=>'goodsDetail','shopId'=>$shop['shopId'],'goodsId'=>$goods['goodsId']])}
                  <a href="tencent://message/?uin={$shop['shopQQ']}&Site=QQ交谈&Menu=yes">
                    <img 
                        style="vertical-align: bottom;"
                        border="0" 
                        src="{:WSTProtocol()}wpa.qq.com/pa?p=1:{$shop['shopQQ']}:7" alt="QQ交谈" width="60" height="20" />
                  </a>
                </div>
                <div class='title'>地址：{$shop['shopAddress']}</div>
                <div class='body'>
                    <div class='itemScore'>
                    描述
                    <br />
                    <span class="c12_e40">
                    {if ($shop['scores']['goodsScore']!=0)}{$shop['scores']['goodsScore']}{else /}5{/if}</div>
                    </span>
                    <div class='itemScore'>
                    服务
                    <br />
                    <span class="c12_e40">
                    {if ($shop['scores']['serviceScore']!=0)}{$shop['scores']['goodsScore']}{else /}5{/if}</div>
                    </span>
                    <div class='itemScore'>
                    物流
                    <br />
                    <span class="c12_e40">
                    {if ($shop['scores']['timeScore']!=0)}{$shop['scores']['goodsScore']}{else /}5{/if}</div>
                    </span>
                    <div class="wst-clear"></div>
                </div>
                <div class='footer'>
                   <a class="home" href='{:Url("home/shops/index","shopId=".$shop["shopId"])}' target='_blank'>进店逛逛</a>
                   {if ($goods['favShop']>0)}
                   <a class="j-fav" href='javascript:void(0);' onclick='WST.cancelFavorite(this,1,{$shop["shopId"]},{$goods['favShop']})'>已关注</a>
                   {else}
                   <a class="j-fav2" href='javascript:void(0);' onclick='WST.addFavorite(this,1,{$shop["shopId"]},{$goods['favShop']})'>关注店铺</a>
                   {/if}
                   <div class='wst-clear'></div>
                </div>
           </div>
       <div class="goods-side">
        <div class="guess-like">
          <div class="title">猜你喜欢</div>
          {wst:goods type='guess' cat="$goods['goodsCatId']" num='3'}
          <div class="item">
            <div class="img"><a target='_blank' href="{:Url('home/goods/detail','goodsId='.$vo['goodsId'])}"><img title="{$vo['goodsName']}" alt="{$vo['goodsName']}" data-original="__RESOURCE_PATH__/{:WSTImg($vo['goodsImg'])}" class="goodsImg" /></a></div>
            <div class="p-name"><a class="wst-hide wst-redlink">{$vo['goodsName']}</a></div>
            <div class="p-price">￥{$vo['shopPrice']}<span class="v-price">￥{$vo['marketPrice']}</span></div>
          </div>
          {/wst:goods}
        </div>
        <div class="hot-goods">
          <div class="title">热销商品</div>
          {wst:goods type='hot' num='3'}
          <div class="item">
            <div class="img"><a target='_blank' href="{:Url('home/goods/detail','goodsId='.$vo['goodsId'])}"><img title="{$vo['goodsName']}" alt="{$vo['goodsName']}" data-original="__RESOURCE_PATH__/{:WSTImg($vo['goodsImg'])}" class="goodsImg" /></a></div>
            <div class="p-name"><a class="wst-hide wst-redlink">{$vo['goodsName']}</a></div>
            <div class="p-price">￥{$vo['shopPrice']}<span class="v-price">￥{$vo['marketPrice']}</span></div>
          </div>
          {/wst:goods}
        </div>
      </div>
    </div>
    <div class='goods-desc'>
        <div id='tab' class="wst-tab-box">
        <ul id='goodsTabs' class="wst-tab-nav">
           <li>商品介绍</li>
           <li>商品评价<span class='appraise-num'>（{$goods['appraiseNum']}）</span></li>
           <li>商品咨询</li>
           <li id="wx_qrcode">
             手机购买
            <img src="__STYLE__/img/detail_qr_icon.png" style="vertical-align:sub" alt="">
            <div class="wx_qrcode_box">
              <div class="qrcode"></div>
              <p style="margin-top:-25px;">微信扫购有惊喜</p>
            </div>
           </li>
           {if !$goods['read']}
           <a id='addCart2' href='javascript:addCart(1,"#buyNum")'>立即购买</a>
           {/if}
        </ul>
        <div class="wst-tab-content" style='width:99%;margin-bottom: 10px;min-height:1312px;'>
             <div class="wst-tab-item goods-desc-box" style="position: relative;">
               {if($goods['attrs'])}
               <ul class='wst-attrs-list'>
                  {if(isset($goods['brandName']) && $goods['brandName']!='')}
                    <div class="brand_name">品牌：<span>{$goods['brandName']}</span></div>
                  {/if}
                  {volist name="$goods['attrs']" id="vo"}
                    <li title='{$vo['attrVal']}'>{$vo['attrName']}：{$vo['attrVal']}</li>
                  {/volist}
                  <div class="wst-clear"></div>
               </ul>
               {/if}
               {$goods['goodsDesc']|htmlspecialchars_decode}
             </div>
             <input type="hidden" id="filtertype" value="all" />
             <script id="tblist" type="text/html">
              <div class="appr-filter">
                <ul class="appr-filterbox">
                  <li><a href="javascript:void(0)" onclick="apprfilter('all')" id='all'>全部评价(<span id="totalNum">0</span>)</a></li>
                  <li><a href="javascript:void(0)" onclick="apprfilter('pic')" id='pic'>晒图(<span id="picNum">0</span>)</a></li>
                  <li><a href="javascript:void(0)" onclick="apprfilter('best')" id='best'>好评(<span id="bestNum">0</span>)</a></li>
                  <li><a href="javascript:void(0)" onclick="apprfilter('good')" id='good'>中评(<span id="goodNum">0</span>)</a></li>
                  <li><a href="javascript:void(0)" onclick="apprfilter('bad')" id='bad'>差评(<span id="badNum">0</span>)</a></li>
                </ul>
              </div>
               {{# for(var i = 0; i < d.length; i++){ }}
               <div class="appraises-box">
               <div class="wst-appraises-right">
                  <div class="userinfo">
                    <img data-original="{{#  if(d[i]['userPhoto'] != null){  }}{{WST.userPhoto(d[i]['userPhoto'])}}{{# } }}" class="apprimg" />
                    <div class="appraiser">
                        {{d[i]['loginName']}}
                    </div>
                  </div>
                  <p>{{d[i].rankName}}</p>
               </div>
                <div class="wst-appraises-left">
                  <div class="appr-starbox">
                    {{#  for(var j=0;j<d[i].avgScore;++j){ }}
                      <div class="appr-star"></div>
                    {{# }  }}
                    {{#for(var g=0;g<5-d[i].avgScore;++g){ }}
                        <div class="appr-star-off"></div>
                    {{# }  }}
                  </div>
                  <div class='wst-clear'></div>
                  <p class="app-content">
                    {{d[i]['content']}}
                    <div class="goods-spec-box">
                        {{d[i]['goodsSpecNames']}}
                    </div>
                  </p>
                  {{#  if(WST.blank(d[i]['images'])!=''){ var img = d[i]['images'].split(','); var length = img.length;  }}
                  <div id="img-file-{{i}}">
                  {{#  for(var g=0;g<length;g++){  }}
                         <img src="__RESOURCE_PATH__/{{img[g].replace('.','_thumb.')}}" layer-src="__RESOURCE_PATH__/{{img[g]}}"  style="width:80px;height:80px;" />
                  {{#  } }}
                  </div>
                  {{# }  }}
                  <span class="apprtime">{{d[i]['createTime']}}</span>
                  {{# if(d[i]['shopReply']!='' && d[i]['shopReply']!=null){ }}
                  <div class="reply-box">
                     <p class="reply-content"><a href="javascript:void(0)" onclick="goShop({{d[i]['shopId']}})">{{d[i]['shopName']}}</a>：{{d[i]['shopReply']}}</p>
                     <p class="reply-time">{{d[i]['replyTime']}}</p>
                 </div>
                 {{# } }}

               </div>
             <div class="wst-clear"></div>
              </div> 
               {{# } }}
               </script>
             <div class="wst-tab-item" style="position: relative;display:none;">
                <div class="appraise-head">
                  <div class="app-head-l">
                    <div class="app-head-lbox">
                      <strong class="text">好评度</strong>
                      <div class='percent'>
                        <i class="best_percent">0</i><span>%</span>
                      </div>
                    </div>

                  </div>
                  <div class="app-head-r">
                    <div class="app-head-rbox">
                      <div class="app-hr-item">
                        <div class="app-hr-text">好评(<i class="best_percent">0</i>%)</div>
                        <div class="percentbox">
                            <div class="percentbg" id="best_percentbg" style="width:0%"></div>
                        </div>
                      </div>
                      <div class="app-hr-item">
                        <div class="app-hr-text">中评(<i class="good_percent">0</i>%)</div>
                        <div class="percentbox">
                            <div class="percentbg" id="good_percentbg" style="width:0%"></div>
                        </div>
                      </div>
                      <div class="app-hr-item">
                        <div class="app-hr-text">差评(<i class="bad_percent">0</i>%)</div>
                        <div class="percentbox">
                            <div class="percentbg" id="bad_percentbg" style="width:0%"></div>
                        </div>
                      </div>
                    </div>
                  </div>

                </div>
                <div id='ga-box'>

                </div>
                <div id='pager' style='text-align:center;'></div>
             </div>
             {/* 商品咨询 */}
             <div class="wst-tab-item" style="position: relative;display:none;">
                <div class="appr-filter">
                  <input type='hidden' id="consultType" value="0" />
                  <ul class="appr-filterbox">
                    <li><a class="gc-filter curr" href="javascript:void(0)" onclick="filterConsult(this,'0')">全部</a></li>
                    {volist name=":WSTDatas('COUSULT_TYPE')" id="vo"}
                    <li><a class="gc-filter" href="javascript:void(0)" onclick="filterConsult(this,'{$vo.dataVal}')">{$vo.dataName}</a></li>
                    {/volist}
                  </ul>
                </div>
                <div class="consult-searchbox">
                    <p class="search-tips">温馨提示：因每位咨询者购买情况、咨询时间等不同，以下回复对咨询者3天内有效，其他网友仅供参考。</p>
                    <div class="searchout">
                      <input type="text" class="search-text" id="consultKey" placeholder="请输入关键词" />
                      <button class="csbtn" onClick="queryConsult(0)">搜索</button>
                    </div>
                </div>
                <div class="wst-clear"></div>
                <div class="consult-listbox" id="consultBox">
                  
                </div>
                <script id="gclist" type="text/html">
                  <ul class='consult-list'>
                    {{# for(var i=0;i<d.length;++i){  }}
                      <li>
                          <ul class="consult-item">
                            {/* 提问 */}
                            <li class='ask'>
                              <p class="wst-lfloat">咨询内容：</p>
                              <div class="wst-lfloat cs-content">{{d[i]['consultContent']}}&nbsp;<span class="c999">({{(WST.blank(d[i]['loginName'])=='')?'游客':d[i]['loginName']}})</span></div>
                              <div class="wst-rfloat">{{d[i]['createTime']}}</div>
                              <div class="wst-clear"></div>
                            </li>
                            {/* 回复 */}
                            {{# if(d[i]['reply']!=''){  }}
                              <li class='answer'>
                                <p class="wst-lfloat">商家回复：</p>
                                <div class="wst-lfloat cs-content">
                                 {{d[i]['reply']}}
                                </div>
                                <div class="wst-rfloat">{{d[i]['replyTime']}}</div>
                                <div class="wst-clear"></div>
                              </li>
                            {{# }  }} 
                            
                          </ul>
                      </li>
                    {{# }  }}
                  </ul>
                </script>
                <div id="consult-pager" style="text-align:right;margin-top:10px;">
                    商品咨询分页占位
                </div>
                {/* 发表咨询 */}
                <div class="consult-publish">
                  <h5>发表咨询</h5>
                  <div class="explain">
                    声明：您可在购买前对产品包装、颜色、运输、库存等方面进行咨询，我们有专人进行回复！因厂家随时会更改一些产品的包装、颜色、产地等参数，所以该回复仅在当时对提问者有效，其他网友仅供参考！咨询回复的工作时间为：周一至周五，9:00至18:00，请耐心等待工作人员回复。
                  </div>
                  <ul>
                    <li>
                      <span class='fbold'>咨询类型：</span>
                      {volist name=":WSTDatas('COUSULT_TYPE')" id="vo"}
                      <label>
                      <input type="radio" name="pointType" value="{$vo.dataVal}" />{$vo.dataName}
                      </label>
                      {/volist}
                      
                    </li>
                    <li>
                      <span class='fbold'>咨询内容：</span>
                      <textarea id="consultContent" placeholder='3~200个字符长度' maxlength='200'></textarea>
                    </li>
                    <li>
                      <button id="consultCommit" onclick="consultCommit()">提交</button>
                    </li>
                  </ul>
                </div>
              </div>
        </div>
    </div>
    <div class='wst-clear'></div>
  </div>
  <div class='wst-clear'></div>
</div>
{/* 对比框 */}
<div class="wst-cont-frame" id="j-cont-frame">
  <div class="head"><span>对比栏</span><a href="javascript:void(0);" class="close" onclick="javascript:contrastGoods(0,0,0)">关闭</a></div>
  <div class="list">
    <div class="goods" id="contrastList"></div>
    <div class="term-contrast">
      <p><a class="contrast" href="{:Url('home/goods/contrast')}" target="_blank">对比</a></p>
      <p><a href="javascript:void(0);" onclick="javascript:contrastDel(0)" class="empty">清空</a></p>
    </div>
  </div>
  <script id="colist" type="text/html">
    {{# if(d.data && d.data.length>0){ }}
    {{# for(var i=0; i<d.data.length; i++){ }}
    <div class="term">
      <div class="img"><a href="{{WST.U('home/goods/detail','goodsId='+d.data[i].goodsId)}}" target="_blank"><img class="contImg" data-original="__RESOURCE_PATH__/{{ d.data[i].goodsImg }}" title="{{ d.data[i].goodsName }}" width="50" height="50"></a></div>
      <div class="info"><a href="{{WST.U('home/goods/detail','goodsId='+d.data[i].goodsId)}}" target="_blank"><p class="name">{{ d.data[i].goodsName }}</p></a><p class="price"><span>￥{{ d.data[i].shopPrice }}</span><a href="javascript:contrastDel({{ d.data[i].goodsId }});" >删除</a></p></div>
    </div>
    {{# } }}
    {{# } }}
    {{# var data = (d.data)?d.data.length:0 }}
    {{# for(var i=data+1; i<5; i++){ }}
    <div class="term-empty">
      <div class="img">{{ i }}</div>
      <div class="info"><p>您还可以继续添加</p></div>
    </div>
    {{# } }}
    </script>
</div>
{include file="default/right_cart"/}
{/block}
{block name="js"}
<script>
var goodsInfo = {
  id:{$goods['goodsId']}, 
  isSpec:{$goods['isSpec']},
  goodsStock:{$goods['goodsStock']},
  marketPrice:"{$goods['marketPrice']}",
  goodsPrice:"{$goods['shopPrice']}"
  {if isset($goods['saleSpec'])}
  ,sku:{:json_encode($goods['saleSpec'])}
  {/if}
}
</script>
<script type='text/javascript' src='__STYLE__/js/cloudzoom.js?v={$v}'></script>
<script type='text/javascript' src='__STYLE__/js/goods.js?v={$v}'></script>
<script type='text/javascript' src='__STYLE__/js/qrcode.js?v={$v}'></script>
<script>
$(function(){
  var qr = qrcode(8, 'H');
  var url = '{:url("wechat/goods/detail","","html",true)}?goodsId={$goods["goodsId"]}';
  qr.addData(url);
  qr.make();
  $('.qrcode').html(qr.createImgTag());
});
function goShop(id){
  location.href=WST.U('home/shops/index','shopId='+id);
}
</script>
{/block}
